package com.hardydou.system.service;

import com.hardydou.system.model.SystemTask;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * @author ：hardy
 * @description：系统任务服务
 * @date ：Created in 2020/6/25
 * @Copyright ：Hardydou.com
 */
public interface ISystemTaskService {

    @Transactional
    void addTask(SystemTask task);

    @Transactional
    void delTask(Long taskId);

    @Transactional
    void update(SystemTask task);

    SystemTask findById(Long taskId);

    List<SystemTask> list(Map params);

    SystemTask findByGroupAndName(String group, String name);

    @Transactional
    void startTask(SystemTask task);

    @Transactional
    void stopTask(SystemTask task);


}
